/*
 * @Author: C.
 * @Date: 2023-04-18 10:24:33
 */
import { apiMaps, apiEnum, apiType } from '/~/maps/apis';
export function getBtnOption(mode: number, type: apiType = apiEnum.AUDITS) {
  const options: any[] = [];
  // if (!mode) return options;
  for (const key in apiMaps) {
    if (apiMaps[key].type == type) {
      options.push({
        ...apiMaps[key],
        disabled: !((Number(key) & mode) == Number(key)),
      });
    }
  }
  return options.sort((a, b) => a.order - b.order);
}
